feat: Add global exclude patterns for file filtering#21
Open
dCodes03 wants to merge 1 commit intoblackboxaicode:mainfrom
Open
feat: Add global exclude patterns for file filtering#21dCodes03 wants to merge 1 commit intoblackboxaicode:mainfrom
dCodes03 wants to merge 1 commit intoblackboxaicode:mainfrom
Conversation
danielnovais-tech
approved these changes
Jan 20, 2026
danielnovais-tech
left a comment
There was a problem hiding this comment.
import json
import os
def getCustomExcludes():
"""
Lê padrões globais de exclusão definidos em settings.json.
Retorna uma lista de strings com os padrões.
"""
config_path = os.path.expanduser("~/.blackbox/settings.json") # exemplo: pasta global do usuário
if not os.path.exists(config_path):
return []
try:
with open(config_path, "r", encoding="utf-8") as f:
data = json.load(f)
return data.get("globalExcludes", [])
except (json.JSONDecodeError, IOError):
return []
danielnovais-tech
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Users cannot define their own global file exclusion patterns. The CLI only supports hardcoded defaults (like node_modules, .git) and per-project .blackboxignore files.
Current Behavior
No way to add custom global patterns
getCustomExcludes() method exists but returns empty array
Expected Behavior
Users should be able to define global exclusion patterns in their config (e.g., in settings.json) that apply across all projects.
Use Case
Users who want to always exclude:
Build artifacts (dist/, build/)
OS files (.DS_Store)
Personal cache folders
Language-specific compiled files (*.pyc, pycache)
fixes #9